<template>
        <header class="header">
			<h1>备忘录</h1>
			<input v-model="val" @keyup.enter="handleVal" class="new-todo" placeholder="请输入您将要做的事情" autofocus>
		</header>
</template>
    
<script>
export default {
    data() {
		return {
			val:""
		}
	},
	methods:{
		handleVal(){
			this.$emit('content', this.val);
			this.val="";
		}
	}
}
</script>

<style>

</style>